//
//  SearchPoint.m
//  TrainTree
//
//  Created by wanghui on 2017/9/21.
//  Copyright © 2017年 YouYeShu. All rights reserved.
//

#import "SearchPoint.h"

@implementation SearchPoint

- (void)awakeFromNib {
    [super awakeFromNib];
    self.icon.layer.cornerRadius = 3.0f;
    self.icon.layer.masksToBounds = YES;
    self.icon.layer.borderWidth = 1.0f;
    self.icon.layer.borderColor = [UIColor colorWithRed:216.0f / 255.0f green:216.0f / 255.0f blue:216.0f / 255.0f alpha:1.0].CGColor;
}

- (void)configWithModel:(SearchPointModel *)model
{
    [self.icon sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",TrainTreeFileImgURL,model.videoCover]] placeholderImage:ImageNamed(@"ty_pic")];
    self.moduleName.text = [NSString stringWithFormat:@"%@ / ", model.moduleName];
    self.lessonName.text = model.lessonName;
    self.contentPointName.text = model.contentPointName;

    self.videoTime.text = [TimeTool convertTimeFromSeconds:model.videoTime];

}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
